Switch
static int code = 0;
void funcSwitch (void)
{
switch (code)
{
case 1:
if (code == 1)
{
/* block of code */
}
break;
case 2:
break;
case 3:
if (code == 3)
{
/* block of code */
}
break;
default:
break;
}
}
In the switch statement, the x-axis represents the default action, and each case statement is shown by a raised line. The two briefly raised lines represent the if statements within case 1 and case 3.
The diagram shows how the if statements are staggered. The if of case 1 is shown on the left and the if of case 3 is shown on the right.